-- GENERATED SPELL FOR [Deathforge Technician] --


function spell0_19979(pUnit, Event) --@Drain Life,Drain--
pUnit:FullCastSpellOnTarget(36825,pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent('Sorts_19979', 5000, 1)
end

function spell1_19979(pUnit, Event) --@Steal Armor,n/a--
pUnit:FullCastSpellOnTarget(36250,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19979', 10320, 1)
end

function Sorts_19979(pUnit, Event)
local choix_sorts_19979 = math.random(0, 1)
if choix_sorts_19979 == 0 then
pUnit:RegisterEvent('spell0_19979', 1, 1)
end
if choix_sorts_19979 == 1 then
pUnit:RegisterEvent('spell1_19979', 1, 1)
end
end

function mob19979_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19979', math.random(1500, 3000), 1)
end

function mob19979_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19979_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19979_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19979, 1, 'mob19979_Action')
RegisterUnitEvent(19979, 2, 'mob19979_Leave')
RegisterUnitEvent(19979, 3, 'mob19979_Kill')
RegisterUnitEvent(19979, 4, 'mob19979_Die')
